<template>
	<view class="box">
		<view class="inputbox" @click="search">
			<image src="../../static/image/搜索.png" mode=""></image>
			<input type="text" value="" placeholder="搜索内容" />
		</view>
		<u-tabs active-color="#f73f33" inactive-color="#999999" :list="list" :is-scroll="true" :current="current"
			@change="change"></u-tabs>
		<view class="listbox" @click="details">
			<view class="orderbox">
				<text>订单号：15978541</text>
				<text class="state">待付款</text>
			</view>
			<Baesorder></Baesorder>
			<view class="lastbox">
				<view class="">
					<text>共4件商品</text>
					<text class="hj">合计<text>￥620.2</text></text>
				</view>
				<!-- <view class="bnbox">
					<view class="qxdd">
						取消订单
					</view>
					<view class="qxdd">
						去支付
					</view>
				</view> -->
				<view class="bnbox">
					<view class="qxdd" @click.stop="refund">
						申请退款
					</view>
					<view class="qxdd" @click.stop="logistics">
						查看物流
					</view>
					<view class="qxdd">
						确认收货
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import Baesorder from "../../components/Baesorder/index.vue"
	export default {
		data() {
			return {
				list: [{
					name: '全部'
				}, {
					name: '待付款'
				}, {
					name: '组团中'
				}, {
					name: '未拼中'
				}, {
					name: '拼团失败'
				}, {
					name: '待使用'
				}, {
					name: '待发货'
				}, {
					name: '待收货'
				}, {
					name: '待评价'
				}],
				current: 0
			}
		},
		methods: {
			change(index) {
				this.current = index;
			},
			// 搜索
			search() {
				this.jumpLink({
					link: "/pagesA/search_result/index"
				})
			},
			// 申请退款
			refund() {
				this.jumpLink({
					link: "/pagesA/application/index"
				})
			},
			// 查看物流
			logistics(){
				this.jumpLink({
					link:"/pages/logistics/index"
				})
			},
			// 查看详情
			details(){
				this.jumpLink({link:"/pages/my_order/index"})
			}
		},
		components: {
			Baesorder
		}
	}
</script>

<style scoped lang="scss">
	.box {
		background-color: #fff;

		.inputbox {
			padding-left: 20rpx;
			box-sizing: border-box;
			display: flex;
			align-items: center;
			margin: 0 auto;
			width: 639rpx;
			height: 64rpx;
			background-color: #f0f0f0;
			border-radius: 32rpx;

			image {
				width: 29rpx;
				height: 29rpx;
			}

			input {
				margin-left: 20rpx;
				font-family: SourceHanSansCN-Regular;
				font-size: 28rpx;
				width: 500rpx;
			}
		}

		.listbox {
			padding: 20rpx;
			box-sizing: border-box;
			margin-bottom: 50rpx;

			.orderbox {
				display: flex;
				align-items: center;
				justify-content: space-between;

				text {
					font-family: SourceHanSansCN-Regular;
					font-size: 24rpx;
					color: #666666;
				}

				.state {
					font-family: SourceHanSansCN-Regular;
					font-size: 24rpx;
					color: #f73f33;
				}
			}

			.lastbox {
				display: flex;
				align-items: center;
				justify-content: space-between;
				margin-top: 40rpx;

				text {
					font-family: SourceHanSansCN-Regular;
					font-size: 24rpx;
					color: #666666;

				}

				.hj {
					margin-left: 10rpx;

					text {
						color: #f73f33;
					}
				}

				.bnbox {
					display: flex;
					align-items: center;

					.qxdd {
						// width: 115rpx;
						height: 41rpx;
						border-radius: 20rpx;
						border: solid 1rpx #bebebe;
						line-height: 41rpx;
						text-align: center;
						font-family: SourceHanSansCN-Regular;
						font-size: 24rpx;
						color: #333333;
						margin-left: 10rpx;
					}
				}
			}
		}
	}
</style>
